<!-- 
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../../js/vue.js"></script>
    <title>04_el与data的两种写法</title>
</head>

<body>
    <div id="root">
        <h1>{{name}}</h1>
    </div>

</body>
<script type="text/javascript">
    Vue.config.productionTip = false;

    new Vue({
        el: "#root",
        data: {
            name: '尚硅谷'
        }
    });
</script>

</html> -->






<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>vue基础</title>
    <script src="../js/vue.js"></script>
</head>

<body>
    <!-- 准备容器 -->
    <div id="root">
        <h1>{{name}},{{age}},{{sno}}</h1>
    </div>

    <div id="root_1">
        <h1>插值语法</h1>
        <h3>{{name}}</h3>
    </div>
    <hr>

    <div id="root_2">
        <h1>指令语法</h1>
        <h3>{{name}}</h3>
        <!-- <a href="[url]">SSSSS</a> -->
        <a :href="url">ffff</a>
        <a v-bind:href="url.toUpperCase()">gogogo{{school.name}}</a>
        <!-- <div :id="val"> -->
        <!-- <a href="http://www.baidu.com">dddd</a> -->

    </div>
    <script type="text/javascript">
        Vue.config.productionTip = false; //阻止vue在启动时产生生产提示；
        // 创建vue实例 Vue函数 参数里面的参数是一个对象，配置对象
        // const x = new Vue({
        new Vue({
            el: "#root",  //用于指定当前Vue实例为那哪个容器服务；
            // el: document.getElementById('root')
            data: {
                name: "keke",
                age: 12,
                sno: 123456
            }


        });
        new Vue({
            el: "#root_2",
            data: {
                name: "集中注意力学习VUE技术",
                url: "http://www.baidu.com",
                school: {
                    name: "sgh"
                }
            }
        });


        new Vue({
            el: "#root_1",
            data: {
                name: "hello"
            }
        });


    </script>


</body>

</html>